<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
  <meta name="generator" content=
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org">

  <title>C++ Algorithms</title>
  <link href="../cppreference.css" rel="stylesheet" type="text/css">
</head>

<body>
<table>
  <tr>
  <td>
  <div class="body-content">

  <div class="header-box">
    <a href="../index.html">cppreference.com</a> &gt; <a href=
    "index.html">C++ Algorithms</a>
  </div>

  <div class="name-format">
    C++ Algorithms
  </div>

  <p><a href="all.html">Display all entries</a> for C++ Algorithms on
  one page, or view entries individually:</p>

  <table class="category-table">
    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "accumulate.html">accumulate</a></td>

      <td class="category-table-td">sum up a range of elements</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "adjacent_difference.html">adjacent_difference</a></td>

      <td class="category-table-td">compute the differences between
      adjacent elements in a range</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "adjacent_find.html">adjacent_find</a></td>

      <td class="category-table-td">finds two items that are adjacent
      to eachother</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "binary_search.html">binary_search</a></td>

      <td class="category-table-td">determine if an element exists in a
      certain range</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href="copy.html">copy</a></td>

      <td class="category-table-td">copy some range of elements to a
      new location</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "copy_backward.html">copy_backward</a></td>

      <td class="category-table-td">copy a range of elements in
      backwards order</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "copy_n.html">copy_n</a></td>

      <td class="category-table-td">copy N elements</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href="count.html">count</a></td>

      <td class="category-table-td">return the number of elements
      matching a given value</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "count_if.html">count_if</a></td>

      <td class="category-table-td">return the number of elements for
      which a predicate is true</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href="equal.html">equal</a></td>

      <td class="category-table-td">determine if two sets of elements
      are the same</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "equal_range.html">equal_range</a></td>

      <td class="category-table-td">search for a range of elements that
      are all equal to a certain element</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href="fill.html">fill</a></td>

      <td class="category-table-td">assign a range of elements a
      certain value</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "fill_n.html">fill_n</a></td>

      <td class="category-table-td">assign a value to some number of
      elements</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href="find.html">find</a></td>

      <td class="category-table-td">find a value in a given range</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "find_end.html">find_end</a></td>

      <td class="category-table-td">find the last sequence of elements
      in a certain range</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "find_first_of.html">find_first_of</a></td>

      <td class="category-table-td">search for any one of a set of
      elements</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "find_if.html">find_if</a></td>

      <td class="category-table-td">find the first element for which a
      certain predicate is true</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "for_each.html">for_each</a></td>

      <td class="category-table-td">apply a function to a range of
      elements</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "generate.html">generate</a></td>

      <td class="category-table-td">saves the result of a function in a
      range</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "generate_n.html">generate_n</a></td>

      <td class="category-table-td">saves the result of N applications
      of a function</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "includes.html">includes</a></td>

      <td class="category-table-td">returns true if one set is a subset
      of another</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "inner_product.html">inner_product</a></td>

      <td class="category-table-td">compute the inner product of two
      ranges of elements</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "inplace_merge.html">inplace_merge</a></td>

      <td class="category-table-td">merge two ordered ranges
      in-place</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "is_heap.html">is_heap</a></td>

      <td class="category-table-td">returns true if a given range is a
      heap</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "is_sorted.html">is_sorted</a></td>

      <td class="category-table-td">returns true if a range is sorted
      in ascending order</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "iter_swap.html">iter_swap</a></td>

      <td class="category-table-td">swaps the elements pointed to by
      two iterators</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "lexicographical_compare.html">lexicographical_compare</a></td>

      <td class="category-table-td">returns true if one range is
      lexicographically less than another</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "lexicographical_compare_3.html">lexicographical_compare_3way</a></td>

      <td class="category-table-td">determines if one range is
      lexicographically less than or greater than another</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "lower_bound.html">lower_bound</a></td>

      <td class="category-table-td">search for the first place that a
      value can be inserted while preserving order</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "make_heap.html">make_heap</a></td>

      <td class="category-table-td">creates a heap out of a range of
      elements</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href="max.html">max</a></td>

      <td class="category-table-td">returns the larger of two
      elements</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "max_element.html">max_element</a></td>

      <td class="category-table-td">returns the largest element in a
      range</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href="merge.html">merge</a></td>

      <td class="category-table-td">merge two sorted ranges</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href="min.html">min</a></td>

      <td class="category-table-td">returns the smaller of two
      elements</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "min_element.html">min_element</a></td>

      <td class="category-table-td">returns the smallest element in a
      range</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "mismatch.html">mismatch</a></td>

      <td class="category-table-td">finds the first position where two
      ranges differ</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "next_permutation.html">next_permutation</a></td>

      <td class="category-table-td">generates the next greater
      lexicographic permutation of a range of elements</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "nth_element.html">nth_element</a></td>

      <td class="category-table-td">put one element in its sorted
      location and make sure that no elements to its left are greater
      than any elements to its right</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "partial_sort.html">partial_sort</a></td>

      <td class="category-table-td">sort the first N elements of a
      range</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "partial_sort_copy.html">partial_sort_copy</a></td>

      <td class="category-table-td">copy and partially sort a range of
      elements</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "partial_sum.html">partial_sum</a></td>

      <td class="category-table-td">compute the partial sum of a range
      of elements</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "partition.html">partition</a></td>

      <td class="category-table-td">divide a range of elements into two
      groups</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "pop_heap.html">pop_heap</a></td>

      <td class="category-table-td">remove the largest element from a
      heap</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "prev_permutation.html">prev_permutation</a></td>

      <td class="category-table-td">generates the next smaller
      lexicographic permutation of a range of elements</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "push_heap.html">push_heap</a></td>

      <td class="category-table-td">add an element to a heap</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "random_sample.html">random_sample</a></td>

      <td class="category-table-td">randomly copy elements from one
      range to another</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "random_sample_n.html">random_sample_n</a></td>

      <td class="category-table-td">sample N random elements from a
      range</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "random_shuffle.html">random_shuffle</a></td>

      <td class="category-table-td">randomly re-order elements in some
      range</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "remove.html">remove</a></td>

      <td class="category-table-td">remove elements equal to certain
      value</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "remove_copy.html">remove_copy</a></td>

      <td class="category-table-td">copy a range of elements omitting
      those that match a certian value</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "remove_copy_if.html">remove_copy_if</a></td>

      <td class="category-table-td">create a copy of a range of
      elements, omitting any for which a predicate is true</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "remove_if.html">remove_if</a></td>

      <td class="category-table-td">remove all elements for which a
      predicate is true</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "replace.html">replace</a></td>

      <td class="category-table-td">replace every occurrence of some
      value in a range with another value</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "replace_copy.html">replace_copy</a></td>

      <td class="category-table-td">copy a range, replacing certain
      elements with new ones</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "replace_copy_if.html">replace_copy_if</a></td>

      <td class="category-table-td">copy a range of elements, replacing
      those for which a predicate is true</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "replace_if.html">replace_if</a></td>

      <td class="category-table-td">change the values of elements for
      which a predicate is true</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "reverse.html">reverse</a></td>

      <td class="category-table-td">reverse elements in some range</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "reverse_copy.html">reverse_copy</a></td>

      <td class="category-table-td">create a copy of a range that is
      reversed</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "rotate.html">rotate</a></td>

      <td class="category-table-td">move the elements in some range to
      the left by some amount</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "rotate_copy.html">rotate_copy</a></td>

      <td class="category-table-td">copy and rotate a range of
      elements</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "search.html">search</a></td>

      <td class="category-table-td">search for a range of elements</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "search_n.html">search_n</a></td>

      <td class="category-table-td">search for N consecutive copies of
      an element in some range</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "set_difference.html">set_difference</a></td>

      <td class="category-table-td">computes the difference between two
      sets</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "set_intersection.html">set_intersection</a></td>

      <td class="category-table-td">computes the intersection of two
      sets</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "set_symmetric_difference.html">set_symmetric_difference</a></td>

      <td class="category-table-td">computes the symmetric difference
      between two sets</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "set_union.html">set_union</a></td>

      <td class="category-table-td">computes the union of two sets</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href="sort.html">sort</a></td>

      <td class="category-table-td">sort a range into ascending
      order</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "sort_heap.html">sort_heap</a></td>

      <td class="category-table-td">turns a heap into a sorted range of
      elements</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "stable_partition.html">stable_partition</a></td>

      <td class="category-table-td">divide elements into two groups
      while preserving their relative order</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "stable_sort.html">stable_sort</a></td>

      <td class="category-table-td">sort a range of elements while
      preserving order between equal elements</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href="swap.html">swap</a></td>

      <td class="category-table-td">swap the values of two objects</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "swap_ranges.html">swap_ranges</a></td>

      <td class="category-table-td">swaps two ranges of elements</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "transform.html">transform</a></td>

      <td class="category-table-td">applies a function to a range of
      elements</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "unique.html">unique</a></td>

      <td class="category-table-td">remove consecutive duplicate
      elements in a range</td>
    </tr>

    <tr class="category-table-tr-2">
      <td class="category-table-td"><a href=
      "unique_copy.html">unique_copy</a></td>

      <td class="category-table-td">create a copy of some range of
      elements that contains no consecutive duplicates</td>
    </tr>

    <tr class="category-table-tr-1">
      <td class="category-table-td"><a href=
      "upper_bound.html">upper_bound</a></td>

      <td class="category-table-td">searches for the last possible
      location to insert an element into an ordered range</td>
    </tr>
  </table>
  </div>
  </td>
  



  </tr>
  </table>
</body></html>
